package com.trg.flex.remote
{
	import mx.rpc.AsyncToken;
	import mx.rpc.IResponder;
	import mx.rpc.events.FaultEvent;
	import mx.rpc.events.ResultEvent;
	import mx.rpc.remoting.Operation;
	import mx.rpc.remoting.RemoteObject;
	
	public class CustomAsyncTokenCall extends AsyncTokenCall
	{
		public function CustomAsyncTokenCall(fireFunction:Function, data:* = null)
		{
			this.fireFunction = fireFunction;
			this.data = data;
			super();
		}
		
		public var fireFunction:Function;
		public var data:*;
		
		override public function fire(callback:Function):void {
			var token:AsyncToken = fireFunction(data);
			setToken(token, callback);
		}
	}
}